<?php

/**
 * @Project NUKEVIET 3.x - GETNEWS
 * @Author ĐẶNG ĐÌNH TỨ (dlinhvan@gmail.com)
 * @Copyright (C) 2010 webdep24.com All rights reserved
 * @Createdate 10/08/2012 08:00
 */

if( ! defined( 'NV_IS_FILE_MODULES' ) ) die( 'Stop!!!' );

$sql_drop_module = array();
$sql_drop_module[] = "DROP TABLE IF EXISTS `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_ngoisao";
$sql_drop_module[] = "DROP TABLE IF EXISTS `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_zing";
$sql_drop_module[] = "DROP TABLE IF EXISTS `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_vnex";
$sql_drop_module[] = "DROP TABLE IF EXISTS `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_dt";
$sql_drop_module[] = "DROP TABLE IF EXISTS `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_24h";

$sql_create_module = $sql_drop_module;
$sql_create_module[] = "CREATE TABLE `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_ngoisao` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `link` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `title` (`title`)
) ENGINE=MyISAM";

$sql_create_module[] = "CREATE TABLE `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_zing` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `link` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `title` (`title`)
) ENGINE=MyISAM";

$sql_create_module[] = "CREATE TABLE `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_vnex` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `link` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `title` (`title`)
) ENGINE=MyISAM";

$sql_create_module[] = "CREATE TABLE `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_dt` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `link` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `title` (`title`)
) ENGINE=MyISAM";

$sql_create_module[] = "CREATE TABLE `" . $db_config['prefix'] . "_" . $lang . "_" . $module_data . "_24h` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `link` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `title` (`title`)
) ENGINE=MyISAM";

//autopro
$_tin247[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_tin247` (`id`, `title`, `link`) VALUES (NULL, 'Hậu trường', 'http://ngoisao.net/rss/hau-truong.rss')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_ngoisao` (`id`, `title`, `link`) VALUES (NULL, 'Thể thao', 'http://ngoisao.net/rss/the-thao.rss')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_ngoisao` (`id`, `title`, `link`) VALUES (NULL, 'Thời cuộc', 'http://ngoisao.net/rss/thoi-cuoc.rss')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_ngoisao` (`id`, `title`, `link`) VALUES (NULL, 'Phong cách', 'http://ngoisao.net/rss/phong-cach.rss')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_ngoisao` (`id`, `title`, `link`) VALUES (NULL, 'Thư giãn', 'http://ngoisao.net/rss/thu-gian.rss')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_ngoisao` (`id`, `title`, `link`) VALUES (NULL, 'làm đẹp', 'http://ngoisao.net/rss/lam-dep.rss')";

//_zing
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_zing` (`id`, `title`, `link`) VALUES (NULL, 'Đời sống', 'http://www.zing.vn/news/doi-song.html')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_zing` (`id`, `title`, `link`) VALUES (NULL, 'Thế giới', 'http://www.zing.vn/news/the-gioi.html')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_zing` (`id`, `title`, `link`) VALUES (NULL, 'Thị trường', 'http://www.zing.vn/news/kinh-doanh.html')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_zing` (`id`, `title`, `link`) VALUES (NULL, 'Sống trẻ', 'http://www.zing.vn/news/nhip-song-tre.html')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_zing` (`id`, `title`, `link`) VALUES (NULL, 'Giải trí', 'http://www.zing.vn/news/the-gioi-sao.html')";

// vnex
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_vnex` (`id`, `title`, `link`) VALUES (NULL, 'Xã hội', 'http://vnexpress.net/gl/xa-hoi/')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_vnex` (`id`, `title`, `link`) VALUES (NULL, 'Xã hội - Giáo dục', 'http://vnexpress.net/gl/xa-hoi/giao-duc/')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_vnex` (`id`, `title`, `link`) VALUES (NULL, 'Xã hội - nhịp điệ trẻ', 'http://vnexpress.net/gl/xa-hoi/nhip-dieu-tre/')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_vnex` (`id`, `title`, `link`) VALUES (NULL, 'Văn hóa', 'http://vnexpress.net/gl/van-hoa/')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_vnex` (`id`, `title`, `link`) VALUES (NULL, 'Văn hóa - hoa hậu', 'http://vnexpress.net/gl/van-hoa/hoa-hau/')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_vnex` (`id`, `title`, `link`) VALUES (NULL, 'Văn hóa - Thời trang', 'http://vnexpress.net/gl/van-hoa/thoi-trang/')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_vnex` (`id`, `title`, `link`) VALUES (NULL, 'Văn hóa - Sân khấu điện ảnh', 'http://vnexpress.net/gl/van-hoa/san-khau-dien-anh/')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_vnex` (`id`, `title`, `link`) VALUES (NULL, 'Văn hóa - Âm nhạc', 'http://vnexpress.net/gl/van-hoa/am-nhac/')";

// dan tri
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_dt` (`id`, `title`, `link`) VALUES (NULL, 'Xã hội', 'http://dantri.com.vn/xa-hoi.rss')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_dt` (`id`, `title`, `link`) VALUES (NULL, 'Thế giới', 'http://dantri.com.vn/Thegioi.rss')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_dt` (`id`, `title`, `link`) VALUES (NULL, 'Thể thao', 'http://dantri.com.vn/The-Thao.rss')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_dt` (`id`, `title`, `link`) VALUES (NULL, 'Giáo dục khuyến học', 'http://dantri.com.vn/giaoduc-khuyenhoc.rss')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_dt` (`id`, `title`, `link`) VALUES (NULL, 'Văn hóa giải trí', 'http://dantri.com.vn/giaitri.rss')";

// 24h
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_24h` (`id`, `title`, `link`) VALUES (NULL, 'Tin tức trong ngày', 'http://hn.24h.com.vn/tin-tuc-trong-ngay-c46.html')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_24h` (`id`, `title`, `link`) VALUES (NULL, 'Tin thể thao', 'http://hn.24h.com.vn/bong-da-c48.html')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_24h` (`id`, `title`, `link`) VALUES (NULL, 'An Ninh xã hội', 'http://hn.24h.com.vn/an-ninh-hinh-su-c51.html')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_24h` (`id`, `title`, `link`) VALUES (NULL, 'Thời trang', 'http://hn.24h.com.vn/thoi-trang-c78.html')";
$sql_create_module[] = "INSERT INTO `" . $db_config['prefix'] . "_" . $lang . "_" . $module_name . "_24h` (`id`, `title`, `link`) VALUES (NULL, 'Tài chính bất động sản', 'http://www.24h.com.vn/tai-chinh-bat-dong-san-c161.html')";

$sql_create_module[] = "INSERT INTO `" . NV_CONFIG_GLOBALTABLE . "` (`lang`, `module`, `config_name`, `config_value`) VALUES ('" . $lang . "', '" . $module_name . "', 'active', '1')";
$sql_create_module[] = "INSERT INTO `" . NV_CONFIG_GLOBALTABLE . "` (`lang`, `module`, `config_name`, `config_value`) VALUES ('" . $lang . "', '" . $module_name . "', 'load_image', '0')";
$sql_create_module[] = "INSERT INTO `" . NV_CONFIG_GLOBALTABLE . "` (`lang`, `module`, `config_name`, `config_value`) VALUES ('" . $lang . "', '" . $module_name . "', 'image_body', '0')";
$sql_create_module[] = "INSERT INTO `" . NV_CONFIG_GLOBALTABLE . "` (`lang`, `module`, `config_name`, `config_value`) VALUES ('" . $lang . "', '" . $module_name . "', 'imgposition', '1')";
$sql_create_module[] = "INSERT INTO `" . NV_CONFIG_GLOBALTABLE . "` (`lang`, `module`, `config_name`, `config_value`) VALUES ('" . $lang . "', '" . $module_name . "', 'module', 'news')";
$sql_create_module[] = "INSERT INTO `" . NV_CONFIG_GLOBALTABLE . "` (`lang`, `module`, `config_name`, `config_value`) VALUES ('" . $lang . "', '" . $module_name . "', 'width', '460')";
$sql_create_module[] = "INSERT INTO `" . NV_CONFIG_GLOBALTABLE . "` (`lang`, `module`, `config_name`, `config_value`) VALUES ('" . $lang . "', '" . $module_name . "', 'height', '285')";
$sql_create_module[] = "INSERT INTO `" . NV_CONFIG_GLOBALTABLE . "` (`lang`, `module`, `config_name`, `config_value`) VALUES ('" . $lang . "', '" . $module_name . "', 'bodyimg', '500')";

?>